package com.gxm.练习.copy;

import cn.hutool.core.bean.BeanUtil;
import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

public class Demo {


    @Test
    public void test01(){
        BeanA beanA = new BeanA();
        BeanB beanB = new BeanB();
        beanA.setpA("A");
        beanA.setpB("B");
        BeanUtil.copyProperties(beanA, beanB);
        System.out.println(beanB);
    }

    @Test
    public void test02(){
        Double d = 0D;
        System.out.println(-d);
    }

    class BeanA {
        private String pA;

        private String pB;

        public String getpA() {
            return pA;
        }

        public void setpA(String pA) {
            this.pA = pA;
        }

        public String getpB() {
            return pB;
        }

        public void setpB(String pB) {
            this.pB = pB;
        }
    }

    class BeanB {

        private String pB;

        private String pC;

        public String getpB() {
            return pB;
        }

        public void setpB(String pB) {
            this.pB = pB;
        }

        public String getpC() {
            return pC;
        }

        public void setpC(String pC) {
            this.pC = pC;
        }
    }
}
